package com.oocl.commandParser;

public class CommandParser {
	
	
	public CommandParser(){
		
	}
	
	public String[] parse(String command){
		String[] input = command.split("\\s+");
		input[0] = input[0].trim();
		if(input.length==1 &&"ls".equalsIgnoreCase(input[0])){
			
			return input;
			
		}else if(input.length==2 && "rm".equalsIgnoreCase(input[0])){
			
			return input;
			
		}else if(input.length==3 && "scp".equalsIgnoreCase(input[0])){
			
			String filename = input[2].split("/")[1];
			return input;
			
		}else{
			String[] result = new String[4];
			return result;
			
		}
	}
}
